﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Orchard.ContentManagement.Records;
using Orchard.ContentManagement;

namespace Redirect404.Models
{
    public class RedirectPartRecord : ContentPartRecord
    {
        public virtual string RequestedUrl { get; set; }
        public virtual string DestUrl { get; set; }
        public virtual bool UseRegex { get; set; }
        public virtual int ProcessOrder { get; set; }
        public virtual string RedirectType { get; set; }
    }

    public class RedirectPart : ContentPart<RedirectPartRecord>
    {
        public string RequestedUrl
        {
            get { return Record.RequestedUrl; }
            set { Record.RequestedUrl = value; }
        }

        public string DestUrl
        {
            get { return Record.DestUrl; }
            set { Record.DestUrl = value; }
        }

        public bool UseRegex
        {
            get { return Record.UseRegex; }
            set { Record.UseRegex = value; }
        }

        public int ProcessOrder
        {
            get { return Record.ProcessOrder; }
            set { Record.ProcessOrder = value; }
        }

        public string RedirectType
        {
            get { return Record.RedirectType; }
            set { Record.RedirectType = value; }
        }
    }
}